﻿@using PluginFramework.Plugins
@{
    ViewBag.Title = "Index";
}

<h2>Available Plugins</h2>
<p>
	@Html.ActionLink("Click for packages","Packages","Plugins")
</p>
@using (Html.BeginForm())
{
	<table>
		<thead>
			<tr>
				<th>
					Name
				</th>
				<th>
					Description
				</th>
				<th>
					Active
				</th>
			</tr>
		</thead>
		<tbody>
		@{
			var i = -1;
		}
			@foreach (PluginStatus plugin in ViewBag.Plugins)
			{
				i++;
				<tr>
					<td>@plugin.PluginInfo.FriendlyName
					</td>
					<td>@plugin.PluginInfo.Description
					</td>
					<td>
					@Html.Hidden("["+i+"].Id",plugin.PluginInfo.Id)
					@Html.CheckBox("["+i+"].IsActive",plugin.IsActive)
					</td>
				</tr>
	}
		</tbody>
	</table>
	
	<div>
	<button type="submit">Update</button>
	</div>
}